<!doctype html>
<meta charset="utf-8"/>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script src="spellcheck_test.js"></script>

<script>
spellcheck_test(
    '<div contenteditable>zz&nbsp;|</div>',
    '',
    '<div contenteditable>#zz# </div>',
    {
      title: 'Has marker on initially misspelled text',
      callback: sample => spellcheck_test(
          sample,
          document => document.getSelection().modify('move', 'backward', 'character'),
          '<div contenteditable>#zz# </div>',
          'Moving cursor to misspelled word does not remove marker.')
    });
</script>
